<template>
	<view class="wrapper">
		<custom-nav-bar 
			:opacityVal="opacityVal" 
			:titleName="'附近球房'" 
			:titleColor="'#fff'"
			:showBackBtn="true">
		</custom-nav-bar>
		<scroll-view scroll-y="true" class="main-content" :style="[{top: customBar + 'px', height: `calc(100vh - ${customBar}px)`}]" @scroll="scrollBg">
	        <view class="club" v-for="(item, index) in 15" :key="index" @click="toDestination()">
	        	到这去
	        </view>
		</scroll-view>
	</view>
</template>

<script>
	import customNavBar from "@/components/custom-nav-bar.vue";
	export default {
		data() {
			const customBar	= uni.getStorageSync('CustomBar');
			return {
				customBar,
				opacityVal: '#2f96f7',
			}
		},
		components: {
			customNavBar,
		},
		methods: {
			toDestination() {
				uni.openLocation({
					longitude: 116.397590,
					latitude: 39.908776,
					name: '天坛', //位置名称
					address: '天坛东站地铁旁' //地址说明
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	.wrapper{
		.main-content{
			position: relative;
			.club{
				background: #f5f5f5;
				padding: 20upx;
				margin: 20upx;
			}
		}
	}

</style>
